//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS TimestreamInfluxDB service.
///
/// Amazon Timestream for InfluxDB is a managed time-series database engine that makes it easy for application developers and DevOps teams to run InfluxDB databases on Amazon Web Services for near real-time time-series applications using open-source APIs. With Amazon Timestream for InfluxDB, it is easy to set up, operate, and scale time-series workloads that can answer queries with single-digit millisecond query response time.
public struct TimestreamInfluxDB: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the TimestreamInfluxDB client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "AmazonTimestreamInfluxDB",
            serviceName: "TimestreamInfluxDB",
            serviceIdentifier: "timestream-influxdb",
            serviceProtocol: .json(version: "1.0"),
            apiVersion: "2023-01-27",
            endpoint: endpoint,
            errorType: TimestreamInfluxDBErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates a new Timestream for InfluxDB cluster.
    @Sendable
    @inlinable
    public func createDbCluster(_ input: CreateDbClusterInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDbClusterOutput {
        try await self.client.execute(
            operation: "CreateDbCluster", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Timestream for InfluxDB cluster.
    ///
    /// Parameters:
    ///   - allocatedStorage: The amount of storage to allocate for your DB storage type in GiB (gibibytes).
    ///   - bucket: The name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.
    ///   - dbInstanceType: The Timestream for InfluxDB DB instance type to run InfluxDB on.
    ///   - dbParameterGroupIdentifier: The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.
    ///   - dbStorageType: The Timestream for InfluxDB DB storage type to read and write InfluxDB data. You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:   Influx I/O Included 3000 IOPS   Influx I/O Included 12000 IOPS   Influx I/O Included 16000 IOPS
    ///   - deploymentType: Specifies the type of cluster to create.
    ///   - failoverMode: Specifies the behavior of failure recovery when the primary node of the cluster fails.
    ///   - logDeliveryConfiguration: Configuration for sending InfluxDB engine logs to a specified S3 bucket.
    ///   - name: The name that uniquely identifies the DB cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster names must be unique per customer and per region.
    ///   - networkType: Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.
    ///   - organization: The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.
    ///   - password: The password of the initial admin user created in InfluxDB. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a secret created in Secrets Manager in your account.
    ///   - port: The port number on which InfluxDB accepts connections. Valid Values: 1024-65535 Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3 Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680
    ///   - publiclyAccessible: Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.
    ///   - tags: A list of key-value pairs to associate with the DB instance.
    ///   - username: The username of the initial admin user created in InfluxDB. Must start with a letter and can't end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a secret created in Secrets Manager in your account.
    ///   - vpcSecurityGroupIds: A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.
    ///   - vpcSubnetIds: A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDbCluster(
        allocatedStorage: Int? = nil,
        bucket: String? = nil,
        dbInstanceType: DbInstanceType,
        dbParameterGroupIdentifier: String? = nil,
        dbStorageType: DbStorageType? = nil,
        deploymentType: ClusterDeploymentType? = nil,
        failoverMode: FailoverMode? = nil,
        logDeliveryConfiguration: LogDeliveryConfiguration? = nil,
        name: String,
        networkType: NetworkType? = nil,
        organization: String? = nil,
        password: String? = nil,
        port: Int? = nil,
        publiclyAccessible: Bool? = nil,
        tags: [String: String]? = nil,
        username: String? = nil,
        vpcSecurityGroupIds: [String],
        vpcSubnetIds: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDbClusterOutput {
        let input = CreateDbClusterInput(
            allocatedStorage: allocatedStorage, 
            bucket: bucket, 
            dbInstanceType: dbInstanceType, 
            dbParameterGroupIdentifier: dbParameterGroupIdentifier, 
            dbStorageType: dbStorageType, 
            deploymentType: deploymentType, 
            failoverMode: failoverMode, 
            logDeliveryConfiguration: logDeliveryConfiguration, 
            name: name, 
            networkType: networkType, 
            organization: organization, 
            password: password, 
            port: port, 
            publiclyAccessible: publiclyAccessible, 
            tags: tags, 
            username: username, 
            vpcSecurityGroupIds: vpcSecurityGroupIds, 
            vpcSubnetIds: vpcSubnetIds
        )
        return try await self.createDbCluster(input, logger: logger)
    }

    /// Creates a new Timestream for InfluxDB DB instance.
    @Sendable
    @inlinable
    public func createDbInstance(_ input: CreateDbInstanceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDbInstanceOutput {
        try await self.client.execute(
            operation: "CreateDbInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Timestream for InfluxDB DB instance.
    ///
    /// Parameters:
    ///   - allocatedStorage: The amount of storage to allocate for your DB storage type in GiB (gibibytes).
    ///   - bucket: The name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.
    ///   - dbInstanceType: The Timestream for InfluxDB DB instance type to run InfluxDB on.
    ///   - dbParameterGroupIdentifier: The id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.
    ///   - dbStorageType: The Timestream for InfluxDB DB storage type to read and write InfluxDB data. You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:   Influx IO Included 3000 IOPS   Influx IO Included 12000 IOPS   Influx IO Included 16000 IOPS
    ///   - deploymentType: Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.
    ///   - logDeliveryConfiguration: Configuration for sending InfluxDB engine logs to a specified S3 bucket.
    ///   - name: The name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB instance names must be unique per customer and per region.
    ///   - networkType: Specifies whether the networkType of the Timestream for InfluxDB instance is IPV4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.
    ///   - organization: The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.
    ///   - password: The password of the initial admin user created in InfluxDB v2. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Secrets Manager in your account.
    ///   - port: The port number on which InfluxDB accepts connections. Valid Values: 1024-65535 Default: 8086 Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680
    ///   - publiclyAccessible: Configures the DB instance with a public IP to facilitate access.
    ///   - tags: A list of key-value pairs to associate with the DB instance.
    ///   - username: The username of the initial admin user created in InfluxDB. Must start with a letter and can't end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Secrets Manager in your account.
    ///   - vpcSecurityGroupIds: A list of VPC security group IDs to associate with the DB instance.
    ///   - vpcSubnetIds: A list of VPC subnet IDs to associate with the DB instance. Provide at least two VPC subnet IDs in different availability zones when deploying with a Multi-AZ standby.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDbInstance(
        allocatedStorage: Int,
        bucket: String? = nil,
        dbInstanceType: DbInstanceType,
        dbParameterGroupIdentifier: String? = nil,
        dbStorageType: DbStorageType? = nil,
        deploymentType: DeploymentType? = nil,
        logDeliveryConfiguration: LogDeliveryConfiguration? = nil,
        name: String,
        networkType: NetworkType? = nil,
        organization: String? = nil,
        password: String,
        port: Int? = nil,
        publiclyAccessible: Bool? = nil,
        tags: [String: String]? = nil,
        username: String? = nil,
        vpcSecurityGroupIds: [String],
        vpcSubnetIds: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDbInstanceOutput {
        let input = CreateDbInstanceInput(
            allocatedStorage: allocatedStorage, 
            bucket: bucket, 
            dbInstanceType: dbInstanceType, 
            dbParameterGroupIdentifier: dbParameterGroupIdentifier, 
            dbStorageType: dbStorageType, 
            deploymentType: deploymentType, 
            logDeliveryConfiguration: logDeliveryConfiguration, 
            name: name, 
            networkType: networkType, 
            organization: organization, 
            password: password, 
            port: port, 
            publiclyAccessible: publiclyAccessible, 
            tags: tags, 
            username: username, 
            vpcSecurityGroupIds: vpcSecurityGroupIds, 
            vpcSubnetIds: vpcSubnetIds
        )
        return try await self.createDbInstance(input, logger: logger)
    }

    /// Creates a new Timestream for InfluxDB DB parameter group to associate with DB instances.
    @Sendable
    @inlinable
    public func createDbParameterGroup(_ input: CreateDbParameterGroupInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDbParameterGroupOutput {
        try await self.client.execute(
            operation: "CreateDbParameterGroup", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Timestream for InfluxDB DB parameter group to associate with DB instances.
    ///
    /// Parameters:
    ///   - description: A description of the DB parameter group.
    ///   - name: The name of the DB parameter group. The name must be unique per customer and per region.
    ///   - parameters: A list of the parameters that comprise the DB parameter group.
    ///   - tags: A list of key-value pairs to associate with the DB parameter group.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDbParameterGroup(
        description: String? = nil,
        name: String,
        parameters: Parameters? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDbParameterGroupOutput {
        let input = CreateDbParameterGroupInput(
            description: description, 
            name: name, 
            parameters: parameters, 
            tags: tags
        )
        return try await self.createDbParameterGroup(input, logger: logger)
    }

    /// Deletes a Timestream for InfluxDB cluster.
    @Sendable
    @inlinable
    public func deleteDbCluster(_ input: DeleteDbClusterInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDbClusterOutput {
        try await self.client.execute(
            operation: "DeleteDbCluster", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a Timestream for InfluxDB cluster.
    ///
    /// Parameters:
    ///   - dbClusterId: Service-generated unique identifier of the DB cluster.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDbCluster(
        dbClusterId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDbClusterOutput {
        let input = DeleteDbClusterInput(
            dbClusterId: dbClusterId
        )
        return try await self.deleteDbCluster(input, logger: logger)
    }

    /// Deletes a Timestream for InfluxDB DB instance.
    @Sendable
    @inlinable
    public func deleteDbInstance(_ input: DeleteDbInstanceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDbInstanceOutput {
        try await self.client.execute(
            operation: "DeleteDbInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a Timestream for InfluxDB DB instance.
    ///
    /// Parameters:
    ///   - identifier: The id of the DB instance.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDbInstance(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDbInstanceOutput {
        let input = DeleteDbInstanceInput(
            identifier: identifier
        )
        return try await self.deleteDbInstance(input, logger: logger)
    }

    /// Retrieves information about a Timestream for InfluxDB cluster.
    @Sendable
    @inlinable
    public func getDbCluster(_ input: GetDbClusterInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDbClusterOutput {
        try await self.client.execute(
            operation: "GetDbCluster", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves information about a Timestream for InfluxDB cluster.
    ///
    /// Parameters:
    ///   - dbClusterId: Service-generated unique identifier of the DB cluster to retrieve.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDbCluster(
        dbClusterId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDbClusterOutput {
        let input = GetDbClusterInput(
            dbClusterId: dbClusterId
        )
        return try await self.getDbCluster(input, logger: logger)
    }

    /// Returns a Timestream for InfluxDB DB instance.
    @Sendable
    @inlinable
    public func getDbInstance(_ input: GetDbInstanceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDbInstanceOutput {
        try await self.client.execute(
            operation: "GetDbInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a Timestream for InfluxDB DB instance.
    ///
    /// Parameters:
    ///   - identifier: The id of the DB instance.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDbInstance(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDbInstanceOutput {
        let input = GetDbInstanceInput(
            identifier: identifier
        )
        return try await self.getDbInstance(input, logger: logger)
    }

    /// Returns a Timestream for InfluxDB DB parameter group.
    @Sendable
    @inlinable
    public func getDbParameterGroup(_ input: GetDbParameterGroupInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDbParameterGroupOutput {
        try await self.client.execute(
            operation: "GetDbParameterGroup", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a Timestream for InfluxDB DB parameter group.
    ///
    /// Parameters:
    ///   - identifier: The id of the DB parameter group.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDbParameterGroup(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDbParameterGroupOutput {
        let input = GetDbParameterGroupInput(
            identifier: identifier
        )
        return try await self.getDbParameterGroup(input, logger: logger)
    }

    /// Returns a list of Timestream for InfluxDB DB clusters.
    @Sendable
    @inlinable
    public func listDbClusters(_ input: ListDbClustersInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDbClustersOutput {
        try await self.client.execute(
            operation: "ListDbClusters", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of Timestream for InfluxDB DB clusters.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a nextToken is provided in the output. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - nextToken: The pagination token. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDbClusters(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDbClustersOutput {
        let input = ListDbClustersInput(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDbClusters(input, logger: logger)
    }

    /// Returns a list of Timestream for InfluxDB DB instances.
    @Sendable
    @inlinable
    public func listDbInstances(_ input: ListDbInstancesInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDbInstancesOutput {
        try await self.client.execute(
            operation: "ListDbInstances", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of Timestream for InfluxDB DB instances.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - nextToken: The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDbInstances(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDbInstancesOutput {
        let input = ListDbInstancesInput(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDbInstances(input, logger: logger)
    }

    /// Returns a list of Timestream for InfluxDB clusters.
    @Sendable
    @inlinable
    public func listDbInstancesForCluster(_ input: ListDbInstancesForClusterInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDbInstancesForClusterOutput {
        try await self.client.execute(
            operation: "ListDbInstancesForCluster", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of Timestream for InfluxDB clusters.
    ///
    /// Parameters:
    ///   - dbClusterId: Service-generated unique identifier of the DB cluster.
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a nextToken is provided in the output. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - nextToken: The pagination token. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDbInstancesForCluster(
        dbClusterId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDbInstancesForClusterOutput {
        let input = ListDbInstancesForClusterInput(
            dbClusterId: dbClusterId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDbInstancesForCluster(input, logger: logger)
    }

    /// Returns a list of Timestream for InfluxDB DB parameter groups.
    @Sendable
    @inlinable
    public func listDbParameterGroups(_ input: ListDbParameterGroupsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDbParameterGroupsOutput {
        try await self.client.execute(
            operation: "ListDbParameterGroups", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of Timestream for InfluxDB DB parameter groups.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - nextToken: The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDbParameterGroups(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDbParameterGroupsOutput {
        let input = ListDbParameterGroupsInput(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDbParameterGroups(input, logger: logger)
    }

    /// A list of tags applied to the resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// A list of tags applied to the resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the tagged resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Tags are composed of a Key/Value pairs. You can use tags to categorize and track your Timestream for InfluxDB resources.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Tags are composed of a Key/Value pairs. You can use tags to categorize and track your Timestream for InfluxDB resources.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the tagged resource.
    ///   - tags: A list of tags used to categorize and track resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes the tag from the specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the tag from the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the tagged resource.
    ///   - tagKeys: The keys used to identify the tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates a Timestream for InfluxDB cluster.
    @Sendable
    @inlinable
    public func updateDbCluster(_ input: UpdateDbClusterInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDbClusterOutput {
        try await self.client.execute(
            operation: "UpdateDbCluster", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a Timestream for InfluxDB cluster.
    ///
    /// Parameters:
    ///   - dbClusterId: Service-generated unique identifier of the DB cluster to update.
    ///   - dbInstanceType: Update the DB cluster to use the specified DB instance Type.
    ///   - dbParameterGroupIdentifier: Update the DB cluster to use the specified DB parameter group.
    ///   - failoverMode: Update the DB cluster's failover behavior.
    ///   - logDeliveryConfiguration: The log delivery configuration to apply to the DB cluster.
    ///   - port: Update the DB cluster to use the specified port.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDbCluster(
        dbClusterId: String,
        dbInstanceType: DbInstanceType? = nil,
        dbParameterGroupIdentifier: String? = nil,
        failoverMode: FailoverMode? = nil,
        logDeliveryConfiguration: LogDeliveryConfiguration? = nil,
        port: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDbClusterOutput {
        let input = UpdateDbClusterInput(
            dbClusterId: dbClusterId, 
            dbInstanceType: dbInstanceType, 
            dbParameterGroupIdentifier: dbParameterGroupIdentifier, 
            failoverMode: failoverMode, 
            logDeliveryConfiguration: logDeliveryConfiguration, 
            port: port
        )
        return try await self.updateDbCluster(input, logger: logger)
    }

    /// Updates a Timestream for InfluxDB DB instance.
    @Sendable
    @inlinable
    public func updateDbInstance(_ input: UpdateDbInstanceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDbInstanceOutput {
        try await self.client.execute(
            operation: "UpdateDbInstance", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a Timestream for InfluxDB DB instance.
    ///
    /// Parameters:
    ///   - allocatedStorage: The amount of storage to allocate for your DB storage type (in gibibytes).
    ///   - dbInstanceType: The Timestream for InfluxDB DB instance type to run InfluxDB on.
    ///   - dbParameterGroupIdentifier: The id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.
    ///   - dbStorageType: The Timestream for InfluxDB DB storage type that InfluxDB stores data on.
    ///   - deploymentType: Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.
    ///   - identifier: The id of the DB instance.
    ///   - logDeliveryConfiguration: Configuration for sending InfluxDB engine logs to send to specified S3 bucket.
    ///   - port: The port number on which InfluxDB accepts connections. If you change the Port value, your database restarts immediately. Valid Values: 1024-65535 Default: 8086 Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDbInstance(
        allocatedStorage: Int? = nil,
        dbInstanceType: DbInstanceType? = nil,
        dbParameterGroupIdentifier: String? = nil,
        dbStorageType: DbStorageType? = nil,
        deploymentType: DeploymentType? = nil,
        identifier: String,
        logDeliveryConfiguration: LogDeliveryConfiguration? = nil,
        port: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDbInstanceOutput {
        let input = UpdateDbInstanceInput(
            allocatedStorage: allocatedStorage, 
            dbInstanceType: dbInstanceType, 
            dbParameterGroupIdentifier: dbParameterGroupIdentifier, 
            dbStorageType: dbStorageType, 
            deploymentType: deploymentType, 
            identifier: identifier, 
            logDeliveryConfiguration: logDeliveryConfiguration, 
            port: port
        )
        return try await self.updateDbInstance(input, logger: logger)
    }
}

extension TimestreamInfluxDB {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: TimestreamInfluxDB, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension TimestreamInfluxDB {
    /// Return PaginatorSequence for operation ``listDbClusters(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbClustersPaginator(
        _ input: ListDbClustersInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDbClustersInput, ListDbClustersOutput> {
        return .init(
            input: input,
            command: self.listDbClusters,
            inputKey: \ListDbClustersInput.nextToken,
            outputKey: \ListDbClustersOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDbClusters(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a nextToken is provided in the output. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbClustersPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDbClustersInput, ListDbClustersOutput> {
        let input = ListDbClustersInput(
            maxResults: maxResults
        )
        return self.listDbClustersPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDbInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbInstancesPaginator(
        _ input: ListDbInstancesInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDbInstancesInput, ListDbInstancesOutput> {
        return .init(
            input: input,
            command: self.listDbInstances,
            inputKey: \ListDbInstancesInput.nextToken,
            outputKey: \ListDbInstancesOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDbInstances(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbInstancesPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDbInstancesInput, ListDbInstancesOutput> {
        let input = ListDbInstancesInput(
            maxResults: maxResults
        )
        return self.listDbInstancesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDbInstancesForCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbInstancesForClusterPaginator(
        _ input: ListDbInstancesForClusterInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDbInstancesForClusterInput, ListDbInstancesForClusterOutput> {
        return .init(
            input: input,
            command: self.listDbInstancesForCluster,
            inputKey: \ListDbInstancesForClusterInput.nextToken,
            outputKey: \ListDbInstancesForClusterOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDbInstancesForCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - dbClusterId: Service-generated unique identifier of the DB cluster.
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a nextToken is provided in the output. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbInstancesForClusterPaginator(
        dbClusterId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDbInstancesForClusterInput, ListDbInstancesForClusterOutput> {
        let input = ListDbInstancesForClusterInput(
            dbClusterId: dbClusterId, 
            maxResults: maxResults
        )
        return self.listDbInstancesForClusterPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDbParameterGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbParameterGroupsPaginator(
        _ input: ListDbParameterGroupsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDbParameterGroupsInput, ListDbParameterGroupsOutput> {
        return .init(
            input: input,
            command: self.listDbParameterGroups,
            inputKey: \ListDbParameterGroupsInput.nextToken,
            outputKey: \ListDbParameterGroupsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDbParameterGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDbParameterGroupsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDbParameterGroupsInput, ListDbParameterGroupsOutput> {
        let input = ListDbParameterGroupsInput(
            maxResults: maxResults
        )
        return self.listDbParameterGroupsPaginator(input, logger: logger)
    }
}

extension TimestreamInfluxDB.ListDbClustersInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TimestreamInfluxDB.ListDbClustersInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension TimestreamInfluxDB.ListDbInstancesForClusterInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TimestreamInfluxDB.ListDbInstancesForClusterInput {
        return .init(
            dbClusterId: self.dbClusterId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension TimestreamInfluxDB.ListDbInstancesInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TimestreamInfluxDB.ListDbInstancesInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension TimestreamInfluxDB.ListDbParameterGroupsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TimestreamInfluxDB.ListDbParameterGroupsInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
